import socket
import ssl
import time

hostname = 'yss'
context = ssl.create_default_context()

with socket.create_connection((hostname, 8080)) as sock:
    with context.wrap_socket(sock, server_hostname=hostname) as ssock:
        while True:
            ssock.send(b"hello")
            print(ssock.recv())
            time.sleep(1)
